package com.markedquilt.comment.service;

import com.markedquilt.comment.coomon.BussinessException;
import com.markedquilt.comment.model.ShopModel;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author ZhangKe
 * @Description
 * @date 2020/4/21 1:59.
 */
public interface ShopService {

    ShopModel create(ShopModel shopModel) throws BussinessException;

    ShopModel get(Integer id);

    List<ShopModel> selectAll();

    List<ShopModel> recommend(BigDecimal longitude,BigDecimal latitude);

    List<Map<String,Object>> searchGroupByTags(String keyword,Integer categoryId,String tags);

    Integer CountAllShop();

    /**
     * 搜索v1.0
     */
    List<ShopModel> search(BigDecimal longitude,BigDecimal latitude,String keyword,
                           Integer orderby, Integer categoryId,String tags);

    /**
     * 搜索v2.0-接入elasticsearch
     */
    Map<String,Object> searchES(BigDecimal longitude,BigDecimal latitude,String keyword,
                             Integer orderby, Integer categoryId,String tags) throws IOException;
}
